package com.huangliusong.web.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 *
 * @author huangliusong
 * @since 2018/10/3
 * {@link @Controller}
 */
@Controller
public class HelloWorldController {
    @GetMapping("/hello")
    public String hello(Model model){

        return "hls1";
    }

    @RequestMapping("")
    public String index(Model model){
        //model.addAttribute("message","huangliusong");
        //System.err.println(Accept);
        return "index";
    }

    @ModelAttribute("message")
    public String message(){
        return "huangliusong1";
    }
}
